mui.ready(function() {
	//	个人信息填充
	document.querySelector(".user_name").innerHTML = sessionStorage.userName;
	document.querySelector(".user_phone").innerHTML = sessionStorage.mobile;
	document.querySelector(".cash span").innerHTML = sessionStorage.money;
	document.querySelector(".yesterday span").innerHTML = sessionStorage.cashbackMoney;
	document.querySelector(".money_left span").innerHTML = sessionStorage.cloudMoney;
	if (sessionStorage.level == "gold") {
		document.querySelector(".level").innerHTML = "金钻会员";
	} 
	if (sessionStorage.level == "vip") {
		document.querySelector(".level").innerHTML = "vip";
	} 
	if (sessionStorage.level == "comm") {
		document.querySelector(".level").innerHTML = "普通会员";
	} 
	if (sessionStorage.pname == "undefined" || sessionStorage.pname == "") {
		document.querySelector(".pname span").innerHTML = "无推荐人";
	} else {
		document.querySelector(".pname span").innerHTML = sessionStorage.pname;
	}

	if (sessionStorage.sex = "M") {
		document.querySelector(".sex").innerHTML = "男";
	}
	if (sessionStorage.sex = "F") {
		document.querySelector(".sex").innerHTML = "女";
	}

	document.querySelector(".index").addEventListener("tap", function() {
		mui.openWindow({
			url: "../index.html",
		});
	});
	document.querySelector(".header").addEventListener("tap", function() {
		mui.openWindow({
			url: "information.html",
		});
	});
	document.querySelector(".six").addEventListener("tap", function() {
		mui.openWindow({
			url: "bankcard.html",
		});
	});
	document.querySelector(".two").addEventListener("tap", function() {
		mui.openWindow({
			url: "commonweal.html",
		});
	});
	document.querySelector(".three").addEventListener("tap", function() {
		if(sessionStorage.level=="gold"){
				mui.openWindow({
					url: "commercial.html",
				});
		}
		else{
			mui.alert("请先升级金钻会员");
		}
	});
	document.querySelector(".carry").addEventListener("tap", function() {
		mui.openWindow({
			url: "carry.html",
		});
	});
	document.querySelector(".four").addEventListener("tap", function() {
		mui.openWindow({
			url: "partner.html",
		});
	});
	document.querySelector(".one").addEventListener("tap", function() {
		mui.openWindow({
			url: "leaveup.html",
		});
	});
	document.querySelector(".change").addEventListener("tap", function() {
		mui.openWindow({
			url: "map.html",
		});
	});
	document.querySelector(".five").addEventListener("tap", function() {
		mui.openWindow({
			url: "recommend_b.html",
		});
	});
	document.querySelector(".message").addEventListener("tap", function() {
		mui.openWindow({
			url: "map.html",
		});
	});
})